package com.gitee.wsl.common.ui.draw.type

/**
 * 位置
 * @author XCL
 */
enum class Location {

    TOP, BOTTOM, LEFT, RIGHT;

     val isTop: Boolean
        get() = this == TOP

     val isBottom: Boolean
        get() = this == BOTTOM

     val isRight: Boolean
        get() = this == RIGHT

     val isLeft: Boolean
        get() = this == LEFT

     val isTopOrBottom: Boolean
        get() = (isTop || isBottom)

     val isLeftOrRight: Boolean
        get() = (isLeft || isRight)

    fun isVertical(): Boolean = (this == LEFT || this == RIGHT)

    fun isHorizontal(): Boolean = (this == TOP || this == BOTTOM)
}


typealias Orient = Location

/**
 * 横向显示位置,靠左，中间，还是靠右(如图标题......)
 * @author XCL
 */
enum class HorizontalAlign {
    LEFT, CENTER, RIGHT
}

/**
 * 竖向显示位置,上方，中间，底部 (如坐标轴标签......)
 * @author XCL
 */
enum class VerticalAlign {
    TOP, MIDDLE, BOTTOM
}